<template>
	<view>
		<view class="list"
			v-for="(item,index) in recList"
			:key="index"
		>
			<view class="spaceBet">
				<view class="childImg defBg">
					<image class="samePar" v-if="item.stuHeadImg == ''" src="../../../../static/images/defHead.png"></image>
					<image class="samePar" :src="getUrl(item.stuHeadImg)" v-else></image>
					<!-- <view class="sex" :class="[item.stuSex == '男' ? 'male' : 'female']">{{item.stuSex}}</view> -->
				</view>
				<view class="childInfo">
					<view class="infoItem">
						<text class="infoTit">姓名</text>
						<text>{{item.stuRealName}}</text>
						<text class="linveView"></text>
						<text class="infoTit">性别</text>
						<view class="sex" :class="[item.stuSex == '男' ? 'male' : 'female']">{{item.stuSex == '' ? '-' : item.stuSex}}</view>
					</view>
					<view class="infoItem">
						<text class="infoTit">账号</text>
						<text>{{item.stuAccount}}</text>
					</view>
					<view class="infoItem">
						<text class="infoTit">生日</text>
						<text>{{item.stuBirthday == '' ? '—' : item.stuBirthday}}</text>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:{
			recList:Array
		},
		computed:{
			getUrl(){
				return function(url){
					if(url != undefined){
						return this.zhuXueServer + '/' + url
					}
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.list{
		background: #fff;
		position: relative;
		@include respTo(phone){
			padding: 30rpx 30rpx 10rpx;
			margin-bottom: 30rpx;
		}
		@include respTo(pad){
			padding: 20rpx 20rpx 10rpx;
			margin-bottom: 20rpx;
		}
	}
	.childInfo{
		flex: 1;
		position: relative;
		.infoItem{
			color: $pss-text-color3;
			display: flex;
			@include respTo(phone){
				height: 60rpx;
				font-size: $font-size30;
			}
			@include respTo(pad){
				height: 40rpx;
				font-size: $padSize18;
			}
			.sex{
				@include respTo(phone){
					height: 38rpx;
					line-height: 38rpx;
					font-size: $font-size26;
					padding: 0 15rpx;
				}
				@include respTo(pad){
					height: 26rpx;
					line-height: 24rpx;
					font-size: $padSize16;
					padding: 0 10rpx;
				}
				color: #fff;
				border-radius:6rpx;
				&.female{
					background: #ffdbdb;
					color: #ef5757;
				}
				&.male{
					background: $pss-color-blue;
				}
			}
			.helpImg{
				width: 43rpx;
				height: 36rpx;
				margin: -5rpx 0 0 10rpx;
			}
			.infoTit{
				margin-right: 20rpx;
				color: $pss-text-color8;
			}
			.linveView{
				background: $pss-text-colord;
				display: block;
				border-radius: 20rpx;
				@include respTo(phone){
					margin: 0 20rpx;
					width: 4rpx;
					height: 22rpx;
					margin-top: 12rpx;
				}
				@include respTo(pad){
					margin: 0 10rpx;
					width: 4rpx;
					height: 16rpx;
					margin-top: 5rpx;
				}
			}
		}
	}
	.childImg{
		@include respTo(phone){
			width: 140rpx;
			height: 140rpx;
			margin-right: 20rpx;
		}
		@include respTo(pad){
			width: 110rpx;
			height: 110rpx;
			margin-right: 15rpx;
		}
		flex-shrink: 0;
		border-radius: 50%;
		position: relative;
		.samePar{
			border-radius: 50%;
		}
	}
</style>